package com.xiyue.leaspring.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.xiyue.leaspring.dao.IDeptDao;
import com.xiyue.leaspring.po.Dept;
import com.xiyue.leaspring.service.IDeptService;

@Service
public class DeptServiceImpl implements IDeptService {

	@Autowired//注入IDeptDaos接口实例
	private IDeptDao deptDao;
	
	@Override
	public boolean add(Dept vo) {
		// TODO Auto-generated method stub
		return this.deptDao.doCreate(vo);//增加实例
	}

	@Override
	public List<Dept> getlist() {
		// TODO Auto-generated method stub
		return this.deptDao.findAll();//数据查询
	}

}
